package com.yanshaohui.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.yanshaohui.service.PersonService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by TS-Ysh on 2018-05-02.
 */
@RestController
public class Test1Controller {

    @Reference
    private PersonService personService;

    @GetMapping("test1/{aa}")
    public String test1(@PathVariable("aa") String name){

        String result = "";
        for(int i=0;i<100;i++){
            result = personService.sayName(name + i);
        }
        return result;
    }

}
